package cn.magicduck.demo;

/**
 * @author 神奇的鸭鸭
 * @description
 * @date 2020/8/1415:33
 */
public class Singleton_02 {

    private static Singleton_02 instance;

    private Singleton_02() {
    }

    public static synchronized Singleton_02 getInstance(){
        if (null != instance) {
            return instance;
        }
        return new Singleton_02();
    }

}
